package com.example.demo.service;

import com.example.demo.dao.SupervisorDao;
import com.example.demo.pojo.Supervisor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

@Service
@Primary
public class SupervisorServiceImpl implements ISupervisorService {
    @Autowired
    private SupervisorDao supervisorDao;

    @Override
    public Supervisor getSupervisorByIdByPass(Supervisor supervisor) {
        return supervisorDao.getSupervisorByIdByPass(supervisor);
    }

    @Override
    public int saveSupervisor(Supervisor supervisor) {
        return supervisorDao.insert(supervisor);
    }

    @Override
    public Supervisor getSupervisorById(String telId) {
        return supervisorDao.selectById(telId);
    }
}